package com.jt.controller;

import com.jt.pojo.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.bind.SchemaOutputResolver;

@RestController
@PropertySource(value = "classpath:/msg.properties",encoding = "utf-8")

public class HelloController {
    private User user = new User().setName("adf").setId(100);



    @Value("${msg}")
    private String msg;
    @GetMapping("/hello")
    public String hello(){
        User user = new User();


        return msg+ this.user.getName();
    }

}
